<?php

class SubmitFormScript extends ScriptBlock
{

	function __construct ()
	{
	$html =  "<script language = \"javascript\">\n";
	$html .= "function submitForm(action)\n";
	$html .= "{\n";
	$html .= "alert ('Hello');\n";
	$html .= "document.getElementById(\"Action\").value = action;\n";
	$html .= "document.getElementById(\"PageForm\").submit();\n";
	$html .= "}\n";

	$html .= "function submitFormPostData(aPostName,aValue)\n";
	$html .= "{\n";
//	$html .= "alert (aPostName);\n";
//	$html .= "alert (aValue);\n";
	$html .= "document.getElementById(aPostName).value = aValue;\n";
//	$html .= "alert (document.getElementById(aPostName).value);\n";
//	$html .= "alert(document.getElementById('PageForm').id);\n";
	$html .= "document.getElementById('PageForm').submit();\n";

	$html .= "}\n";
	$html .= "</script>\n";
	$this->scriptHTML = $html;
	}
}

?>